﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;
using System.Collections.Generic;

namespace YiSha.Entity.QixingManage
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2024-11-06 00:51
    /// 描 述：实体类
    /// </summary>
    [Table("goods_attributes")]
    public class GoodsAttributesEntity : BaseEntity
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? goods_types_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public string attribute_name { get; set; }

        public string input_list { get; set; }

        public int? sort { get; set; }

        /// <summary>
        /// 是否允许上传文件
        /// </summary>
        [NotMapped]
        public bool allowfile { get; set; }= false;
    }

    public class BaseGoodsAttrDto
    {
        public long Id { get; set; }

        public string name { get; set; }

        public List<GoodsExtendedAttributesDto> list { get; set; }=new List<GoodsExtendedAttributesDto>();
    }
}
